package notes.java.sjms23.t19_prototype;

//原型模式
//克隆钱
public class Client {

    public static void main(String[] args) throws CloneNotSupportedException {
        // 100元
        ConcreteMoney cm = new ConcreteMoney("100元");
        cm.show();
        
        System.out.println("---------克隆---------------");
        
        for(int i=0; i<10; i++) {
            ConcreteMoney money = (ConcreteMoney)cm.clone();
            System.out.println("是原来对象吗？" + (cm == money));
            money.show();
        }
    }
}
